@using System.Linq
@using ApiGenerator
@using ApiGenerator.Domain
@using ApiGenerator.Domain.Code
@inherits ApiGenerator.CodeTemplatePage<RestApiSpec>
@{ await IncludeAsync("GeneratorNotice.cshtml", Model); }
// ReSharper disable RedundantUsingDirective
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Linq;
using Nest;
@{ await IncludeAsync("HighLevel/Client/Usings.cshtml", Model);}

namespace Nest
{
	///<summary>
	///Elasticsearch high level client 
	///</summary>
	public partial interface IElasticClient 
	{
		@foreach(var kv in Model.EndpointsPerNamespaceHighLevel)
		{
		if (kv.Key != CsharpNames.RootNamespace)
		{
<text>		///<summary>@(kv.Key.SplitPascalCase()) APIs</summary>
			@CsharpNames.HighLevelClientNamespacePrefix@(kv.Key)@CsharpNames.ClientNamespaceSuffix @kv.Key { get; }
</text>
			continue;
		}
			var endpoints = kv.Value;
			var models = endpoints.Select(e=>e.HighLevelModel).ToList();
			foreach(var m in models)
			{
				await IncludeAsync("HighLevel/Client/Interface/MethodInterface.cshtml", m);
			}
		}
	}
}
